package com.atguigu.yygh.hosp.controller.admin;

import com.atguigu.yygh.common.result.R;
import com.atguigu.yygh.hosp.service.DepartmentService;
import com.atguigu.yygh.vo.hosp.DepartmentVo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @description:
 * @author :又菜又爱玩的→速趴塞亚锦←
 * @create :2023/5/18
 * @param  :1.8
 */
@RestController
@RequestMapping("/admin/hosp/department")
public class DepartmentController {

    @Resource
    private DepartmentService departmentService;

    //医院管理里面的排班计划及显示及折叠层次
    @GetMapping("/{hoscode}")
    public R getDepartmentList(@PathVariable String hoscode){
        List<DepartmentVo> list=departmentService.getDepartmentList(hoscode);
        return R.ok().data("list",list);
    }
}
